import {
  legacy_createStore,
  combineReducers,
  applyMiddleware,
  compose,
} from 'redux'
import reduxThunk from 'redux-thunk'
import allReducer from './allReducer.ts'
let composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
  ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({})
  : compose

const store = legacy_createStore(
  combineReducers(allReducer),
  composeEnhancers(applyMiddleware(reduxThunk))
)
export default store
